package com.seo.controller.task;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import com.seo.service.task.impl.UserKeywordsTaskServiceImpl;
import com.seo.utils.DateUtil;

import lombok.extern.slf4j.Slf4j;

/**
 * 调度类
 * 
 * @author Administrator
 * @version 2018.08.02 17:40
 */
@Slf4j
@Component
@EnableScheduling
public class UserKeywordsTask {

	@Autowired
	private UserKeywordsTaskServiceImpl userKeywordsTaskService;

	@Scheduled(cron = "0 0 01 * * ?")
	public void addKeywords() {
		log.info("调度开始-[{}]", DateUtil.getTime());
		userKeywordsTaskService.runUserKeywordsDeduc();
	}


}
